package com.lzq.chatroom_project.controller;

import com.lzq.chatroom_project.common.utils.CacheUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class RedisController {
    @Autowired
    private CacheUtil cacheUtil;
    @RequestMapping("/set")
    public void setValue(String key, String value) {
        cacheUtil.set(key, value);
    }
    @RequestMapping("/get")
    public void getValue(String key) {
        System.out.println(cacheUtil.get(key));
    }
}
